import request from "@/utils/http/http";



// export const rebrandlist= (page:string,limit:string) =>{
//    return request.get(`/admin/product/baseTrademark/${page}/${limit}`)
// }

import type { IAddEditParams, IReqTrademarkList, IResTrademarkInfo } from '@/types/Trademark'


/**
 * @description 品牌列表
 * @param page 当前是第几页
 * @param limit 每页展示多少条数据
 */
export const reqTrademarkList = (page: number, limit: number) => {
  return request.get<IReqTrademarkList>(`/admin/product/baseTrademark/${page}/${limit}`)
}

/**
 * @description 新增品牌
 * @param data
 */
export const reqAddTrademark = (data: IAddEditParams) => {
  return request.post('/admin/product/baseTrademark/save',  data)
}

/**
 * @description 删除品牌
 * @param id 品牌id
 */
export const reqDelTrademark = (id: number) => {
  return request.delete(`/admin/product/baseTrademark/remove/${id}`)
}

/**
 * @description 品牌详情
 * @param id
 */
export const reqTrademarkInfo = (id: number) => {
  return request.get<IResTrademarkInfo>(`/admin/product/baseTrademark/get/${id}`)
}

/**
 * @description 修改品牌
 * @param data
 */
export const reqEditTrademark = (data: IAddEditParams) => {
  return request.put('/admin/product/baseTrademark/update', data)
}

/**
 * @description 获取全部的品牌
 * @param data
 */
export const reqAllTrademark = () => {
  return request.get<IResTrademarkInfo[]>('/admin/product/baseTrademark/getTrademarkList')
}
